﻿using System;
using System.Data.Entity;
using System.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;

namespace Portal.Repository.SkillsCatalog.Tests.System
{
	[TestClass]
	public abstract class SkillsCatalogTests
	{
		private DbContextTransaction _transaction;


		protected MockRepository Mocks { get; private set; }
		protected SkillsCatalogEntities Entities { get; private set; }
		protected PortalEntities PortalEntities { get; private set; }

		[TestInitialize]
		public void TestInitialize()
		{
			Entities = new SkillsCatalogEntities();
			PortalEntities = new PortalEntities();
			_transaction = Entities.Database.BeginTransaction();
			Mocks = new MockRepository();
		}

		[TestCleanup]
		public virtual void TestCleanup()
		{
			_transaction.Rollback();
		}
	}

}
